function setmainselection(sf)
% set the selection in the main window
global CONTROL
if(any(sf > length(CONTROL)) || any(sf < 1))
   return;
end;
htag = findobj('Tag', 'CTL');
set(htag, 'Value', sf);
